package com.jiazhong.构造方法;

public class Demo01 {
    public static void main(String[] args) {
        Person person=new Person("张三",12);
        System.out.println(person.name+"\n"+person.age);
    }
}
class  Person{
    public String name;
    public int age;

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }
}
